The slave replication process does not start mysql and starts the skip-slave-start parameter bitsCN.com.
The slave replication process does not start mysql and starts the skip-slave-
The slave replication process does not start mysql and starts the skip-slave-start parameter. There is a set of master and slave databases. In the early stage, only some of these databases are copied in the my. cnf configuration file. Later, due to business requirements, the database that has not been copied should als
new event. The I/O thread writes these events to the relay log.The last step of SQL slave thread processing this process. The SQL thread reads the event from the relay log, replays the event, and updates the slave data so that it is consistent with the data in the master. As long as the thread is consistent with the I/O thread, the relay log is usually located in the OS cache, so the overhead of the relay log is very small.In addition, there is also a working thread in the master: Like other
architecture, that is, a MySQL Server (Slave) replicates logs from another MySQL Server (Master), then parses the logs and applies them to itself. In a replication environment, only two hosts running MySQL Server are required. In a simpler environment, we can start two mysq
is master-master replication? Master-master replication means that two or more MySQL servers are master servers, and everyone replicates to each other. The advantage is that each server, both can write data, while the slave server in the master and slave databases cannot write data. The principle of master-slave replication
... execute >reset SLAVE; then re-execute the >change MASTER to that statement. >show SLAVE status\g (see if Io_thread and sql_thread are on )>stop SLAVE Io_thread; (slave-side io_thread can be stopped if there is a problem with the data on Master )Slave-side Restart mysqld,io_thread and sql_thread will start automatically, data directory /mydata/data/ Relay-log.info and master.info These two files are the basis and premise of
MySQL replication is primarily replicated from the primary master.
What is master-slave replication
Master-slave replication means that there is a single device to do as the primary server, one or more servers as from the server. No data is written from the server, and the source of the data is the primary server. Th
time, the entire syntax of the SQL statement is recorded during statement-based replication, while row-based replication records the value of now () updated to the database.For example, run the following statement on the master server:Mysql> update user set createtime = now () where sid = 16;If now () returns the value 20:46:35Statement-based replication records
Mysql replication, mysql master-slave Replication
I. Significance of Replication
Mysql replication is the foundation for building large-scale and high-performance
account must be granted the replication slave permission. IfAn account is only used for replication (recommended), so no additional permissions are required.# Mysql-uroot-p123456Mysql> grant replication slave on *. *'Replicase' @ '192. 192.% 'identified by '123 ′;2. Create a test database test1 on the master serverMys
/#downloadsMysqlreplicate Quick Start ReplicationMysqlrplcheck Fast Check replication environmentMysqlrplshow Show Replication topologyMysqlfailover failoverMysqlrpladmim Management ToolsFive, based on Gtid and multi-threaded replication experimentTo use the replication feat
--i/o thread. The I/O thread opens a normal connection on master and then starts Binlog dump process. Binlog dump process reads the event from the binary log of master, and if it has been followed by master, it sleeps and waits for master to produce a new event. The I/O thread writes these events to the relay log.The SQL slave thread handles the final step of the process. The SQL thread reads events from the log, updating the slave data so that it is consistent with the data in master. As long a
from a master server and then parses and applies them to itself.
(3) In a simple replication environment, only two mysql-running hosts are required. You can even start two mysqld instances on one physical server host. One works as the master and the other acts as the slave to complete the replication environment. Howe
the mysql service;
4. Run the linux Command to go to mysql and check whether the slave is correctly started. If an exception occurs during startup, ensure that the Server Load balancer instance is started properly;
5. The newly added database is in the master-master replication chain for testing;
5. How to remove a database from an existing Master:
1. modify the
log content from the specified location (or from the beginning of the log) to the designated log file;2. When Master receives a request from an IO thread from Slave, the IO thread that is responsible for the replication reads the log information from the specified log at the specified location based on the requested information and returns the IO thread to the Slave side. In addition to the information contained in the log, the return information inc
.
MySQL replication setup
Environment preparation
Master 192.168.1.5
Slave 192.168.1.6
OS: Oracle Linux 6.1
MySQL: 5.5.37
Master Configuration
1) Assign the copy permission
Both the master database and slave Database need to be executed
2) Clear log files
Both the master and slave databases enable binary log files by default.
Note that if you do not want to c
'; # replication client: the user has the right to ask where the submitter/controller is. Replication slave: required to reply to the submitter. Mysql> flush privileges;
2) set a server as a slave server
Vim/etc/My. CNF # The slave server does not need binary logs, only need to start relay log comment out log-bin and
trunk logs. First, slave starts a worker thread--i/o thread. The I/O thread opens a normal connection on master and then starts Binlog dump process. Binlog dump process reads the event from the binary log of master, and if it has been followed by master, it sleeps and waits for master to produce a new event. The I/O thread writes these events to the relay log.The SQL slave thread handles the final step of the process. The SQL thread reads events from the log, updating the slave data so that it
--i/o thread. The I/O thread opens a normal connection on master and then starts Binlog dump process. Binlog dump process reads the event from the binary log of master, and if it has been followed by master, it sleeps and waits for master to produce a new event. The I/O thread writes these events to the relay log.The SQL slave thread handles the final step of the process. The SQL thread reads events from the log, updating the slave data so that it is consistent with the data in master. As long a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.